 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Redirect.aspx.cs" 
    Inherits="CS490_Capstone___Stubby.Page.Redirect" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Redirecting Stubby...</title>
    <script type="text/javascript">
        function getBrowserHeight(target) {
            // retreives the inner height of the browser window to pass to the next page
            var browserHeight = window.innerHeight;

            // redirects browser to Search.aspx with browserHeight as a query parameter
            var redirectString = target + ".aspx?height=" + browserHeight;
            window.location = redirectString;
        }
    </script>
</head>

<body onload="getBrowserHeight('<%= Request.QueryString["target"].ToString() ?? "Search" %>')">
    
</body>

</html>